export default {
    changeName (state, username) {
      state.username = username
      if(localStorage.username){
        state.isLogin = true;
      }else{
        state.isLogin = false;
      }
      // try {
      //   localStorage.username = username
      // } catch (e) {}
    },
    changeRole (state){
        if(localStorage.roles){
            state.isAdmin = true;
        }else{
            state.isAdmin = false;
        }
        
    }
  }